package com.guigu.qingcheng.client;

import com.guigu.qingcheng.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name="service-user")
@Component
public interface UserClient {

    /**
     * 查询省份列表
     * @return
     */
    @GetMapping("/user/provinces/list")
    public R provincesList();

    /**
     * 根据省份id查询市列表
     * @return
     */
    @GetMapping("/user/cities/queryShiById/{id}")
    public R queryShiById(@PathVariable("id") String id);

    /**
     * 根据市id查询区列表
     * @return
     */
    @GetMapping("/user/areas/queryByQuId/{id}")
    public R queryByQuId(@PathVariable("id") String id);
}
